@model PopUpProductViewModel

@{
	string twoLettersCulture = new System.Globalization.CultureInfo(Culture).TwoLetterISOLanguageName;	
}

<div class="view-container">
  <!-- Form begin -->
  <div class="entity-form-container">
    @using (Html.BeginForm("", "", FormMethod.Post, new { id = "" })) {
      @Html.ValidationSummary(true)
      <fieldset>
        <legend>@Resources.ProductResources.Product</legend>
		<div class="form">
          @Html.HiddenFor(model => model.Id)
	      <div class="row">
			<div class="field-cell">
			  <div class="label">
				@Html.Label(Resources.ProductResources.Name)
			  </div>
			  <div class="editor">
				@Html.TextBoxFor(model => model.Name)
				@Html.ValidationMessageFor(model => model.Name)
			  </div>
			</div>
			<div class="field-cell">
			  <div class="label">
				@Html.Label(Resources.ProductResources.Description)
			  </div>
			  <div class="editor">
				@Html.TextBoxFor(model => model.Description)
				@Html.ValidationMessageFor(model => model.Description)
			  </div>
			</div>
	      </div>
	      <div class="row">
			<div class="field-cell">
			  <div class="label">
				@Html.Label(Resources.ProductResources.Price)
			  </div>
			  <div class="editor number-editor">
				@Html.TextBoxFor(model => model.Price)
				@Html.ValidationMessageFor(model => model.Price)
			  </div>
			</div>
			<div class="field-cell">
			  <div class="label">
				@Html.Label(Resources.ProductResources.Tax)
			  </div>
			  <div class="editor number-editor">
				@Html.TextBoxFor(model => model.Tax)
				@Html.ValidationMessageFor(model => model.Tax)
			  </div>
			</div>
	      </div>
	      <div class="row">
			<div class="field-cell">
			  <div class="label">
				@Html.Label(Resources.ProductResources.Prominent)
			  </div>
			  <div class="editor">
				@Html.CheckBoxFor(model => model.Prominent)
				@Html.ValidationMessageFor(model => model.Prominent)
			  </div>
			</div>
			<div class="field-cell">
			  <div class="label">
				@Html.Label(Resources.ProductResources.Weight)
			  </div>
			  <div class="editor number-editor">
				@Html.TextBoxFor(model => model.Weight)
				@Html.ValidationMessageFor(model => model.Weight)
			  </div>
			</div>
	      </div>
	      <div class="row">
			<div class="field-cell">
			  <div class="label">
				@Html.Label(Resources.ProductResources.Discount)
			  </div>
			  <div class="editor number-editor">
				@Html.TextBoxFor(model => model.Discount)
				@Html.ValidationMessageFor(model => model.Discount)
			  </div>
			</div>
			<div class="field-cell">
			  <div class="label">
				@Html.Label(Resources.ProductResources.IsInactive)
			  </div>
			  <div class="editor">
				@Html.EditorFor(model => model.IsInactive)
				@Html.ValidationMessageFor(model => model.IsInactive)
			  </div>
			</div>
	      </div>
	      <div class="row">
		@if(ViewBag.MasterProperty != null && ViewBag.MasterProperty != "Subcategory")
		{
			<div class="field-cell">
			  <div class="label">
			    @Html.LabelFor(model => model.SubcategoryId)
			  </div>
			  <div class="editor">
			    @Html.DropDownListFor(model => model.SubcategoryId, new SelectList(Model.SubcategoryList, "Id", "IdentityDescription", Model.SubcategoryId))           
			    @Html.ValidationMessageFor(model => model.SubcategoryId)
			  </div>
			</div>
		}
		else
		{
			@Html.HiddenFor(model => model.SubcategoryId)
		}
	      </div>
		</div>
      </fieldset>
    }
    </div>
	<!-- Form end -->
</div>
<script type="text/javascript">
function @(ViewBag.Name)LoadScripts(detailName)
{
DefaultAddOrDetailPopUpEventTriggers("@(ViewBag.Name)-dialog");
}
</script>
